import request from '@/utils/request'
/**
 * @param 获取列表
 */
export function getBusinessOpportunityList(query) {
  return request({
    url: '/ord/business/opportunity/list',
    method: 'GET',
    params: query
  })
}
//新增
export function addBusinessOpportunity(data) {
  return request({
    url: 'ord/business/opportunity/add',
    method: 'POST',
    data
  })
}
//编辑
export function updateBusinessOpportunity(data) {
  return request({
    url: 'ord/business/opportunity/update',
    method: 'POST',
    data
  })
}
//详情
export function getBusinessOpportunityDetail(id) {
  return request({
    url: `ord/business/opportunity/get/${id}`,
    method: 'POST'
  })
}
//删除
export function delBusinessOpportunity(id) {
  return request({
    url: `ord/business/opportunity/delete/${id}`,
    method: 'POST'
  })
}
//商机模糊搜索
export function getBusinessOpportunityListSelect(query) {
  return request({
    url: 'ord/business/opportunity/list/select',
    method: 'get',
    params: query
  })
}

//商机转移
export function transferOpportunity(data) {
  return request({
    url: 'ord/business/opportunity/transfer',
    method: 'POST',
    data
  })
}

// 商机数据导入
export function importOpportunityData(data) {
  return request({
    url: '/ord/business/opportunity/import',
    method: 'post',
    data
  })
}
// 旧ERP历史订单 查询
export function erpOlderporder(data) {
  return request({
    url: '/ord/order/olderporder/list',
    method: 'post',
    data
  })
}
// 导入跟进接口
export function importFollow(data) {
  return request({
    url: '/ord/business/opportunity/importFollow',
    method: 'post',
    data
  })
}
// 导出商机接口
export function exportOpportunity(data) {
  return request({
    url: '/ord/business/opportunity/export',
    method: 'post',
    data
  })
}
